# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-django-htmx
pkgver=1.17.3
pkgrel=1
pkgdesc="Extensions for using Django with htmx"
url="https://django-htmx.readthedocs.io/"
arch="noarch"
license="MIT"
depends="
	py3-asgiref
	py3-django
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest-django"
subpackages="$pkgname-pyc"
source="https://github.com/adamchainz/django-htmx/archive/$pkgver/py3-django-htmx-$pkgver.tar.gz"
builddir="$srcdir/django-htmx-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
61957ece20fb0a83aabc2e5c73ea8e37e91b16f0762b6390689eef3a16760cc90b60e4f9575dec8b52adce7d6d512a5a07e6f34abc4fb20849d2a586a968ea68  py3-django-htmx-1.17.3.tar.gz
"
